package com.myproject.security.authorizationcodemodel.conf;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 自定义web页面
 * @author ywh
 */
@Configuration
public class MvcConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        //自定义的登陆页面
        registry.addViewController("/login").setViewName("login");
        //自定义的授权页面
        registry.addViewController("/oauth/confirm_access").setViewName("oauth_approval");
    }

}